<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>  

<h2>Administration</h2>

<form:form name="frmBase" modelAttribute="base" action="base.save" method="post">
    
    <table border="0">
        <tr>
            <th>Année:</th>
            <td>
                <form:input path="annee" />
            </td>
        </tr>
        <tr>
            <th>
                Etablissement:
            </th>
            <td>
                <form:select items="${etablissements}" itemValue="id" itemLabel="nom" path="etablissement.id" />
            </td>
        </tr>
        <tr>
            <th>Admin:</th>
            <td>
                Login: <input type="text" name="login" value="${admin.login}" />&nbsp;&nbsp;
                Password: <input type="text" name="password" value="${admin.password}" />&nbsp;&nbsp;
                
            </td>
        </tr>
        <tr>
            <th>Admin (Confirmation):</th>
            <td>
                Login: <input type="text" name="login2" value="" />&nbsp;&nbsp;
                Password: <input type="text" name="password2" value="" />&nbsp;&nbsp;
               
            </td>
        </tr>
        <tr>
            <th></th>
            <td>
                <input type="button" value="Annuler" onclick="javascript:location='bases'"/>
                <input type="submit" value="Enregistrer" />
            </td>
        </tr>
    </table>
    
</form:form>